/*
* TrackController.java
* Actual track controller
* Author: Nikolas Parshook
* Date Created: 2012-12-13
* Date Last Updated: 2012-12-13
*/

import javax.swing.*;


/**
* Actual track controller
* @author Nikolas Parshook
*/

public class TrackController {

	Block section;
	public JPanel panel;
	public int id;
	public PLC plc;
	
	
	
	
	/**
	* Constructor
	* @param section section of track governed by this controller
	* @param id track controller id number
	*/
	
	public TrackController(Block section, int id)
	{
		this.section = section;
		this.id = id;
		plc = new PLC();
		panel = new JPanel();
		panel.add(new JLabel(new Integer(this.id).toString()));
	}
	
	
	/**
	* Runs the plc for this controller
	*/
	public void run()
	{
		this.plc.run(this.section);
	}
}
